#include<iostream>
using namespace std;
int main() {
	int a, m, d,s=0,i;
	cin >> a;
	cin >> m;
	d = a;
	for (i = 0; i < m; i++)
	{
		s = s + a;
		a = a * 10 + d;
	}
		cout << s;
}